package com.cesgroup.zw.spring.boot.library.echarts.bar.move;

import com.cesgroup.zw.spring.boot.echarts.component.series.Bar;
import com.cesgroup.zw.spring.boot.echarts.model.style.ItemStyle;

/**
 * @author ytj
 * @date 2019/7/8 9:48
 */
@SuppressWarnings("serial")
public class MoveBarSeries extends Bar {
    public MoveBarSeries(MoveBarParam param,String type){
        if("1".equals(type))
            this.type1(param);
        else if("2".equals(type))
            this.type2(param);
        else if("3".equals(type))
            this.type3(param);
    }
    public void type1(MoveBarParam param){
        this.setName("1");
        this.setType("bar");
        this.setBarWidth("15%");
        this.setItemStyle(new ItemStyle(){{
            this.setColor("#f5804d");
            this.setBarBorderRadius(12);
        }});
    }
    public void type2(MoveBarParam param){
        this.setName("2");
        this.setType("bar");
        this.setBarWidth("15%");
        this.setItemStyle(new ItemStyle(){{
            this.setColor("#09bcb7");
            this.setBarBorderRadius(11);
        }});
    }
    public void type3(MoveBarParam param){
        this.setName("3");
        this.setType("bar");
        this.setBarWidth("15%");
        this.setItemStyle(new ItemStyle(){{
            this.setColor("#6851f1");
            this.setBarBorderRadius(11);
        }});
    }
}
